package com.joven.interface4.controller;

import com.joven.interface4.config.NacosConfig;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: wzj
 * @Date: 2024/2/18 9:31
 */
@RestController
@RequestMapping("/helloTest")
@RequiredArgsConstructor
public class HelloController {

    private final NacosConfig nacosConfig;
    @GetMapping("/config")
    public String helloNacosConfig(){
        return nacosConfig.getName().concat(":").concat(nacosConfig.getServerAddr());
    }
}
